﻿using System;
using System.Windows.Forms;


namespace SQLDiagConfiguration
{
    /// <summary>
    /// This class implements defines the PerfMon Counter objects for
    /// use in the PerfmonOjbect class. It is used to hold one object
    /// in the collection for display on the Perfmon Options Pane TreeView control
    /// </summary>
    class PerfmonCounterInfoObject :IComparable
    {
        private string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        private int rowNumber;

        public int RowNumber
        {
            get { return rowNumber; }
            set { rowNumber = value; }
        }
        private string description;

        public string Description
        {
            get { return description; }
            set { description = value; }
        }
        private bool enabled;

        public bool Enabled
        {
            get { return enabled; }
            set { enabled = value; }
        }
        private TreeNode parentNode;

        public TreeNode ParentNode
        {
            get { return parentNode; }
            set { parentNode = value; }
        }
        private PerfmonObjectInfoObject parentObj;

        internal PerfmonObjectInfoObject ParentObj
        {
            get { return parentObj; }
            set { parentObj = value; }
        }
        /// <summary>
        /// IComparable interface implementation
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        int IComparable.CompareTo(object obj)
        {
            PerfmonCounterInfoObject otherobject = obj as PerfmonCounterInfoObject;
            return string.Compare(this.Name, otherobject.name,StringComparison.CurrentCulture);
        }
    }
}

  
